package club.kingyin.commons.entity.user;

import club.kingyin.commons.enums.BlogEnum;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;

/**
 * (Message)表实体类
 *
 * @author makejava
 * @since 2022-01-20 15:04:02
 */
@Data
@SuppressWarnings("serial")
public class Message extends Model<Message> {
    //消息ID
    @TableId(type = IdType.AUTO)
    private Integer id;
    //JSON内容
    private String data;
    //时间戳
    private Long timestamp;
    //相关事务id
    private Integer objectid;
    //消息接收id
    private Integer userid;
    //消息状态
    private BlogEnum status;
    //推送头像
    private String avatar;
    //Html内容
    private String html;
    //消息类型
    private BlogEnum type;

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.id;
    }
    }

